GtkStyle: Return the default icon set if no context is attached.
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Nov 2010 00:13:27 +0000 (01:13 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:39 +0000 (15:39 +0100)
gtk/gtkstyle.c

index cdd12491c64f9edc08f186cc19f29a63d9274589..ad23f22a22c89822b59de2f79991c06ea04930a8 100644 (file)
@@ -1007,7 +1007,10 @@ gtk_style_lookup_icon_set (GtkStyle   *style,
 
   priv = GTK_STYLE_GET_PRIVATE (style);
 
-  return gtk_style_context_lookup_icon_set (priv->context, stock_id);
+  if (priv->context)
+    return gtk_style_context_lookup_icon_set (priv->context, stock_id);
+
+  return gtk_icon_factory_lookup_default (stock_id);
 }
 
 /**